package util

import (
	"bytes"
	"math/rand"
	"time"
)

var (
	s = "abcdefghijklmnopqrstuvwxyz0987654321-"
	l = len(s)
)

func init() {
	rand.Seed(time.Now().UnixNano())
}

// RandStr 返回随机字符串
func RandStr() string {
	var buf bytes.Buffer
	for i := 0; i < 16; i++ {
		buf.WriteByte(s[rand.Intn(l)])
	}
	return buf.String()
}
